<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <!-- th:if 条件成立就显示 -->
    <span th:if="${flag == 'yes'}">中公教育</span><br/>

    <!--三元表达式-->
    <span th:text="${flag == 'yes'?'中公教育' : '教育'}"></span><br/>

    <!-- th:unless 条件不成立就显示 -->
    <span th:unless="${flag == 'no'}">中公教育2</span><br/>


    <!-- switch选择语句 -->
    <div th:switch="${menu}">
        <p th:case="'admin'">User is an administrator</p>
        <p th:case="${manager}">User is a manager</p>
    </div>
</body>
</html>